import request from '@/utils/request'

// 登陆请求

export function subjectList(params) {
    return request({
        url: '/subjects',
        method: 'get',
        params

    })
}

// 获取用户资料
export const subjectApi = (id) => {
    return request({
        method: 'get',
        url: '/subjects/' + id,
    })
}

// 添加
export const addsubjectApi = (data) => {
    return request({
        method: 'post',
        url: '/subjects',
        data
    })
}
// 修改
export const editsubjectApi = (data) => {
    return request({
        method: 'PUT',
        url: '/subjects/' + data.id,
        data
    })
}

// 删除
export const delsubjectApi = (id) => {
    return request({
        method: 'DELETE',
        url: '/subjects/' + id,

    })
}
// 详情
export const dsubjectApi = (params) => {
    return request({
        method: 'GET',
        url: '/subjects/simple',
        params

    })
}

